# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-google-auth-httplib2
pkgver=0.1.0
pkgrel=4
pkgdesc="Google Authentication Library: httplib2 transport"
url="https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2"
license=('Apache')
arch=('any')
depends=('python-google-auth' 'python-httplib2' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner' 'python-mock' 'python-flask' 'python-pytest-localserver')
source=("https://pypi.io/packages/source/g/google-auth-httplib2/google-auth-httplib2-$pkgver.tar.gz")
sha512sums=('afc54c502046b29504641772ac135e2a11a6daaf6d76dcdb5daecebcd20887d098579eca8dab49fa59667544d323aee10bb99199d3c62e72582353dbddad88e2')

build() {
  cd "$srcdir"/google-auth-httplib2-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/google-auth-httplib2-$pkgver
  python setup.py pytest
}

package() {
  cd google-auth-httplib2-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
